{% load markup %}
{% extends "base.html" %}

{% block content %}
{% if error_message %}<p class="error">{{ error_message }}</p>{% endif %}
{% if ideas %}
<h3>To create a new Idea just write its name in the url</h3>
<div class="pagination">
	<p>
	{% if previous %}
	<a href="/ideas/wiki/list/?page={{ previous }}"><strong>Previous</strong></a>
	{% else %}
	<span><strong>Previous</strong></span>
	{% endif %}
	{% if next %}
	<a href="/ideas/wiki/list/?page={{ next }}"><strong>Next</strong></a></p>
	{% else %}
	<span><strong>Next</strong></span>
	{% endif %}
	<h4>Page {{ page }} of {{ pages }}</h4>
</div>
{% for idea in ideas %}

<div class="featurebox"><h3><a href="/ideas/{{ idea.title }}">{{ idea.title }}</a> by {{ idea.author }}
	<span class="date"> Tags: {{ idea.tags }}</span>
	<span class="date">Published : {{ idea.pub_date }}</span>
	<span class="date">Modified : {{ idea.change_date }}</span>
	</h3>
	<p><a onclick="switchMenu('collapse{{ forloop.counter }}');">Show Text</a></p>
	
	<div id="collapse{{ forloop.counter }}" style="display: none;">
		<span>{{ idea.text|markdown }}</span>
	</div>
</div>

{% endfor %}
<div class="pagination">
	<p>
	{% if previous %}
	<a href="/ideas/wiki/list/?page={{ previous }}"><strong>Previous</strong></a>
	{% else %}
	<span><strong>Previous</strong></span>
	{% endif %}
	{% if next %}
	<a href="/ideas/wiki/list/?page={{ next }}"><strong>Next</strong></a></p>
	{% else %}
	<span><strong>Next</strong></span>
	{% endif %}
	<h4>Page {{ page }} of {{ pages }}</h4>
</div>
{% endif %}
{% endblock %}